package main

import (
	"fmt"
	"time"
)

var locked int

func CmdRun() {
	fmt.Println("cmdrun")
	time.Sleep(time.Second * 30)
	locked = 0
}
func GetLockValue() int {

	locked = 0
	return locked
}

/*
func main() {
	x := 1
	locked = 0
	for {
		x = x + 1
		time.Sleep(time.Second * 1)
		fmt.Println(x)
		if x >= 10 {
			break
		}
		if locked == 0 {
			locked = 1
			go CmdRun()
			locked = GetLockValue()

		} else {
			fmt.Println("jump")
		}

	}
	fmt.Println("finished")
}
*/

func main() {

	x := 0
	for {
		fmt.Println("get the x")
		fmt.Println(x)

		if x < 10 {
			x = x + 1
			continue

			fmt.Println(x)
		} else {
			fmt.Println("x more than 10")
			break
		}
	}

}
